package meta.api.web.common.presentation;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import meta.api.web.common.util.ApiUtil;

//@Controller
public class PageNotFoundController {
    @RequestMapping(value="/**")
    public String main(HttpServletRequest req, HttpServletResponse res) throws Exception {
        HttpSession session = req.getSession(false);
        if (session != null) {
            session.invalidate();
        }
        ApiUtil.setBadRequestResponse(req, res);
        return null;
    }
}
